package cn.thornbird.orgsync.model.netease;

import cn.thornbird.orgsync.model.IResponse;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class Response implements IResponse {

    @JsonProperty("success")
    private Boolean success;

    @JsonProperty("code")
    private Integer code;

    @JsonProperty("message")
    private String message;

    @Override
    public boolean isSuccess() {
        return code != null && code.intValue() == 0 && success != null && success;
    }

}
